import request from '@/utils/request'

export default {
    
    //①添加课程
    addCourseInfo(courseInfo){
        return request({
            url: `/eduservice/course/addCourseInfo`,
            method: 'post',
            data:courseInfo
          })
    },
    //查询所有讲师
    getListTeacher(){
        return request({
            url: `/eduservice/teacher/findAll`,
            method: 'get'
          })
    },
    // 根据课程id查询课程基本信息
    getCourseInfo(id){
        return request({
            url: `/eduservice/course/getCourseInfo/${id}`,
            method: 'get'
          })
    }
    // 修改课程
    ,
   
    updateCourseInfo(courseInfoVo){
        return request({
            url: `/eduservice/course/updateCourseInfo`,
            method: 'post',
            data:courseInfoVo
          })
    },
    //课程确认信息显示
    getPublishCourseInfo(id){
        return request({
            url: `/eduservice/course/getPublishCourseInfo/${id}`,
            method: 'get'
          })
    },
    //课程最终发布
    publishCourse(id){
        return request({
            url: `/eduservice/course/publishCourse/${id}`,
            method: 'post'
          })
    },
    //课程列表
    getCourseList(){
        return request({
            url: `/eduservice/course/getCourseList`,
            method: 'get'
          })
    },
    //查询课程带分页
    getCourseList(current,limit,courseQuery){
        return request({
            url: `/eduservice/course/getCourseList/${current}/${limit}`,
            method: 'post',
            data:courseQuery
          })
    },
    // 删除课程
    removeCourse(id){
        return request({
            url: `/eduservice/course/removeCourse/${id}`,
            method: 'delete'
          })
    }
}